package service.impl;

import dao.UserRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import pojo.UserRole;
import service.UserRoleService;

import java.util.List;

@Service
public class UserRoleServiceImpl implements UserRoleService {

    @Autowired
    private UserRoleMapper userRoleMapper;

    @Override
    public UserRole findById(String roleId) {
        return userRoleMapper.findById(roleId);
    }

    @Override
    public List<UserRole> findAll() {
        return userRoleMapper.findAll();
    }

    @Override
    public int addRole(UserRole role) {
        return userRoleMapper.addRole(role);
    }

    @Override
    public int updateRole(UserRole role) {
        return userRoleMapper.updateRole(role);
    }

    @Override
    public int deleteRole(String roleId) {
        return userRoleMapper.deleteRole(roleId);
    }
}